package com.example.restaurant.controller.form;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddUserForm {

    @ApiModelProperty("账号")
    @NotBlank
    private String username;

    @ApiModelProperty("密码")
    @NotBlank
    @Min(4)
    private String password;

    @ApiModelProperty("联系电话")
    @NotNull
//    @Length(min = 11,max = 11)
    private long telephone;



}
